<%@page import="java.util.*, com.cms.config.*, com.cms.facade.*,com.cms.util.*,com.cms.bean.SysConfigBean"%>
<%@page import="org.apache.log4j.Logger"%>
<%@taglib uri="/i18n-1.0" prefix="i18n"%>
<%
	response.setContentType("text/html; charset=UTF-8");
	SysConfigBean sysbean = ApplicationHelper.getApplicationSysConfigBean(session);
%>
<i18n:bundle baseName="i18n-ebizport" locale="<%=SessionFacade.getLocale(session)%>"/>
<html>
<head>
<meta name="keywords" content="<%=sysbean.getWebKey()%>" />
<meta name="description" content="<%=sysbean.getWebDesc()%>" />
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=sysbean.getWebName()%></title>
<link rel="stylesheet" type="text/css" href="<%=URLPath.CSS_DIR%>/global.css">
<script src="<%=URLPath.JS_DIR%>/jquery-1.9.1.js"></script>
<script src="<%=URLPath.JS_DIR%>/main.js"></script>
<script src="<%=URLPath.JS_DIR%>/checkelements.js"></script>
<!--[if lt IE 9]>
      <script src="<%=URLPath.JS_DIR%>/html5shiv.js"></script>
<![endif]-->
<style>
.login {
	position: absolute;
	width: 540px;
	height: 200px;
	left: 50%;
	top: 50%;
	margin-left: -270px;
	margin-top: -100px;
}
.login-icon {
	top: 0px;
	left: 0px;
	padding:24px 24px 20px 32px;
	position: absolute;
	width: 100px;
	height:200px;
	font-size: 32px;
	font-weight: bold;
	color: #fff;
	background-color: #1abc9c;
	font-family: '黑体';
}

.login-form {
	background-color: #edeff1;
	padding: 34px 23px 20px;
	position: relative;
	border-radius: 6px;
	margin-left: 100px;
	width:310px;
	height:200px;
}
.login-btn{
	top: 0px;
	right: 30px;
	padding:60px 23px 20px;
	position: absolute;
	width: 100px;
	height:200px;
	font-size: 15px;
	font-weight: bold;
	color: #fff;
	background-color: #27AE60;
	font-family: '黑体';
	text-align:center;
}
/* 文本输入框 */
.u-login-ipt {
	width: 190px;
	height: 25px;
	border: 1px solid #D9D9D9;
	border-top-color: #c0c0c0;
	line-height: 27px;
	font-size: 13px;
	color: #777;
	margin-bottom:10px;
	background: #fff;
}
/* 文本输入框 */
.u-login-ipt:hover,
.u-login-ipt:focus {
	border: 1px solid #e00;
}
.login-link {
  color: #bfc9ca;
  display: block;
  font-size: 13px;
  margin-top: 15px;
  text-align: center;
}
.login_title{
  color: #95A5A6;
  font-size: 14px;
  margin-top:-30px;
  width:60px;
}
</style>
<script type="text/javascript">
function changeImg(obj){
	obj.src = "<%=URLPath.GET_CODE_URL%>";
}
function login(){
	if(!checkFormElements(document.loginform)) return;
	document.loginform.submit();
}
function KeyDown(obj)
{
    if (event.keyCode == 13)
    {
		obj.blur();
        login();
    }
}
function init(){
	document.loginform.user.focus();
}
</script>
</head>
<body style="background-color: #3498DB" onload="init();">
<form name="loginform" action="<%=URLPath.ADMIN_URL %>"  method="post" target="_self">
<input type="hidden" name="cmd" value="login"/>
<input type="hidden" name="doNothing" value="N"/>
	<div class="login">
			<div class="login-icon"><i18n:message key="admin_management"/></div>
			
			<div class="login-form">	
                <div>
                     <span class="login_title"><i18n:message key="login_name"/></span>
                     <input type="text" class="u-login-ipt" name="user" value="" onkeydown="KeyDown(this);" notnull="true"  note='<i18n:message key="login_name"/>'/>
                </div>
                <div>
                     <span class="login_title" style="letter-spacing:13px;"><i18n:message key="login_pwd"/></span>
                     <input type="password" class="u-login-ipt" name="password" value="" onkeydown="KeyDown(this);" notnull="true"  note='<i18n:message key="login_pwd"/>'/>
                </div>
                <div style="  margin-bottom:10px;">
                     <span class="login_title"><i18n:message key="login_check_code"/></span>
                     <input type="text" class="u-login-ipt" name="check_code" value="" onkeydown="KeyDown(this);" style="width:90px;" notnull="true"  note='<i18n:message key="login_check_code"/>'/>
                     <img title='<i18n:message key="change_one"/>' src="<%=URLPath.GET_CODE_URL%>" onclick="changeImg(this)" border="0" style="cursor:hand;width:95px;height:25px;margin-top:-21px">
                </div>
                <font color="red">
                <% if(RequestFacade.getErrorCode(request)>0){%>
                 <i18n:message key="<%=RequestFacade.getErrorMsg(request)%>"/> 
                <%
                  }else if(RequestFacade.getErrorCode(request)<0){ 
                	  out.print(RequestFacade.getErrorMsg(request));
                  } 
                %>
                </font>
				<a class="login-link" href="#"><i18n:message key="forget_password"/>?>>></a>
			</div>
			
			<div class="login-btn">
			     <img src="<%=URLPath.IMG_DIR %>/male.png" border="0" style="width:45px;height:45px;margin-bottom:8px;cursor:hand;" onclick="login();"/>
			     <span style="letter-spacing:13px;cursor:hand;" onclick="login();"><i18n:message key="login"/></span>
			</div>
	</div>
</form>
</body>
</html>